package edu.drexel.jrexel2d.networking;

import java.net.DatagramPacket;
import java.net.InetAddress;

public class GamePacket {
	//private String data;
	//private int byteSize;
	private DatagramPacket packet;
	private byte[] dataBuffer;
	//private int port;

	
/*	public byte[] getDataBuffer() {
		return dataBuffer;
	}
	public void setDataBuffer(byte[] dataBuffer) {
		this.dataBuffer = dataBuffer;
	}*/
	public int getPort() {
		return packet.getPort();
	}
	/*public void setPort(int port) {
		this.port = port;
	}*/
	public GamePacket(int byteSize) {
		//this.byteSize = byteSize;
		dataBuffer  = new byte[byteSize];
		packet = new DatagramPacket(dataBuffer, byteSize);
				
	}
	public GamePacket(byte[] sendDataArray, int length, InetAddress address,
			int port) {
		packet= new DatagramPacket(sendDataArray, length, address,
				port); 		
		
	}
	public InetAddress getAddress(){
		return packet.getAddress();
	}
	public byte[] getData() {
		return packet.getData();
	}
/*	public void setData(String data) {
		packet.setData(data);
	}*/
/*	public int getByteSize() {
		return byteSize;
	}*/
/*	public void setByteSize(int byteSize) {
		this.byteSize = byteSize;
	}*/
	public DatagramPacket getPacket() {
		return packet;
	}
	public void setPacket(DatagramPacket packet) {
		this.packet = packet;
	}
	

	
	
}
